<template>
  <div class="mainview">
    <el-container>
      <el-header height="80px">
        <el-menu
          :default-active="activeIndex"
          class="el-menu-demo"
          mode="horizontal"
          @select="handleSelect"
          background-color="#545c64"
          text-color="#fff"
          active-text-color="#ffd04b"
        >
          <el-menu-item index="1">
            <router-link to="/main">首页</router-link>
          </el-menu-item>
          <el-menu-item index="1">
            <router-link to="/">游戏大厅</router-link>
          </el-menu-item>
          <el-menu-item index="1">
            <router-link to="/mall">游戏商城</router-link>
          </el-menu-item>
          <el-menu-item index="1">
            <router-link to="/">活动中心</router-link>
          </el-menu-item>
          <el-menu-item index="1">
            <router-link to="/">充值中心</router-link>
          </el-menu-item>
          <el-menu-item index="1">
            <router-link to="/room">聊天室</router-link>
          </el-menu-item>
        </el-menu>
      </el-header>
      <el-main><router-view></router-view></el-main>
      <el-footer>Footer</el-footer>
    </el-container>
  </div>
</template>

<script>
export default {
  data() {
    return {
      activeIndex: "1",
      activeIndex2: "1",
    };
  },
  methods: {
    handleSelect(key, keyPath) {
      console.log(key, keyPath);
    },
  },
};
</script>

<style>
html,
body,
#app,
.el-container {
  padding: 0px;
  margin: 0px;
  height: 100%;
}
.mainview {
  width: 100vw;
  height: 100vh;
}

.el-header,
.el-footer {
  background-color: 0000;
  color: #333;
  text-align: center;
  line-height: 60px;
}
.el-header {
  background-color: #545c64;
}
.el-main {
  background-color: #f0f7b9;
  color: #333;
  text-align: center;
  /* line-height: 160px; */
}

body > .el-container {
  margin-bottom: 40px;
}
.el-row {
  margin-bottom: 20px;
}
.el-col {
  margin-top: 20px;
  border-radius: 4px;
}
.bg-purple-dark {
  background: #99a9bf;
}
.bg-purple {
  background: #d3dce6;
}
.bg-purple-light {
  background: #e5e9f2;
}
.grid-content {
  border-radius: 4px;
  min-height: 60px;
}
.row-bg {
  padding: 10px 0;
  background-color: #f9fafc;
}
</style>